package com.syaccp.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 客户优惠卷表
 *
 * @TableName t_customer_coupon
 */
@TableName(value = "t_customer_coupon")
@Data
@Accessors(chain = true)
public class CustomerCoupon implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 优惠劵名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 优惠劵金额
     */
    @TableField(value = "money")
    private Integer money;

    /**
     * 客户id
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 客户名称
     */
    @TableField(value = "customer_name")
    private String customerName;

    /**
     * 可领取开始时间
     */
    @TableField(value = "start_time")
    private LocalDateTime startTime;

    /**
     * 可领取结束时间
     */
    @TableField(value = "end_time")
    private LocalDateTime endTime;

    /**
     * 1 待使用；2已使用；3已过期
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableField(value = "del_flag")
    @TableLogic(value = "0", delval = "2")
    private Integer delFlag;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    private Integer createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    @TableField(value = "update_by")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 使用门槛
     */
    @TableField(value = "remark")
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
